package common.pojo;

import java.util.List;

/**
 * Created by luozongsheng on 20/12/16.
 */
public class Page<T> {

    private List<T> result;

    private int curPage;

    private int pageSize;

    private int totalCount;

    private int totalPage;

    public Page(){

    }
    public List<T> getResult() {
        return result;
    }

    public void setResult(List<T> result) {
        this.result = result;
    }

    public int getCurPage() {
        return curPage;
    }

    public void setCurPage(int curPage) {
        this.curPage = curPage;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(int totalCount) {
        this.totalCount = totalCount;
    }

    public int getTotalPage() {
        totalPage=totalCount/pageSize;
        if(totalCount%pageSize!=0){
            totalPage++;
        }
        return totalPage;
    }

}
